# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric do
  @moduledoc """
  The metric used for dataset level evaluation.

  ## Attributes

  *   `aggregationMetrics` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The aggregation metrics to use.
  *   `bleuSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BleuSpec.t`, *default:* `nil`) - Spec for bleu metric.
  *   `exactMatchSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExactMatchSpec.t`, *default:* `nil`) - Spec for exact match metric.
  *   `pairwiseMetricSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseMetricSpec.t`, *default:* `nil`) - Spec for pairwise metric.
  *   `pointwiseMetricSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PointwiseMetricSpec.t`, *default:* `nil`) - Spec for pointwise metric.
  *   `rougeSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RougeSpec.t`, *default:* `nil`) - Spec for rouge metric.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :aggregationMetrics => list(String.t()) | nil,
          :bleuSpec => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BleuSpec.t() | nil,
          :exactMatchSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExactMatchSpec.t() | nil,
          :pairwiseMetricSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseMetricSpec.t() | nil,
          :pointwiseMetricSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PointwiseMetricSpec.t() | nil,
          :rougeSpec => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RougeSpec.t() | nil
        }

  field(:aggregationMetrics, type: :list)
  field(:bleuSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BleuSpec)
  field(:exactMatchSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExactMatchSpec)

  field(:pairwiseMetricSpec,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseMetricSpec
  )

  field(:pointwiseMetricSpec,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PointwiseMetricSpec
  )

  field(:rougeSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RougeSpec)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
